This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
In Lotus Designer Help, 8.5.1, searching for "Debug Java" -> "Debugging Java code":
Debugging Java code
You can debug Java™ code running under control of a Notes® client JVM (Java Virtual Machine).
The Notes client supports Java debugging in the following three contexts. Each context has its own JVM. Only one user can debug at a time in each context.
Foreground - Java code that runs in the Notes client interactively, for example, an agent triggered from the Actions menu.
Background - Java code that runs in the Notes client under control of the task loader, for example, a locally scheduled agent.
Web preview - Java code being previewed in a browser through Domino® Designer, for example, an applet on a form.
Java code from a script library runs in the context of the calling code.
Do the following:
Add JavaEnableDebug=1 to the notes.ini file in the Notes directory.
Choose Tools > Java Debugging Preferences. This opens the "Java Debugging Preferences" dialog.
To enable foreground debugging, select Client Agents/Applets and specify a port number to connect the Notes and debugger computers.
To enable background debugging, check Locally Scheduled Agents and specify a port number to connect the Notes and debugger computers.
To enable Web preview debugging, check Http Preview and specify a port number to connect the Notes and debugger computers.
Restart Notes.
Set up the element for debugging.
Open the element in Domino Designer.
On the Properties tab, select Security then select Compile Java code with debugging information.
Open the main class, for example, JavaAgent.java.
Add sleep commands at the beginning. The duration must be long enough so you can connect with the debugger at runtime.
---> try {sleep(20000);} catch(Exception e){};
Set a breakpoint at the line following the sleep commands.
Save the element.
Create a debug configuration.
Open the main class.
Click Run > Debug Configurations.
In the "Debug Configurations” dialog, select Remote Java Application and create a new configuration.
Name the configuration.
Specify the project containing the element being debugged.
Set the host to localhost or 127.0.0.0.
Set the port to match the value set in the Notes client.
Click Apply and Close.
Debug the element.
Start the element in the Notes client. For example, an agent might be started from the Actions menu.
In Domino Designer, open the main class. Ensure that a breakpoint is set.
Click Run > Debug Configurations.
Select the debug configuration that matches the element you are debugging and click Debug.
The element stops at the breakpoint and you can debug. After starting the element, you must apply the remaining steps while the element is sleeping.
To debug a second element, select the element through the Browse button in "Debug Configurations" and click Apply.
----> I don't understand this last thing well...
Feedback response number WEBB8ATG88 created by ~Tip Zentumiplopgon on 11/02/2010